/PROG  JOBPNS0049
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "53393576/77";
PROG_SIZE	= 3411;
CREATE		= DATE 20-02-27  TIME 15:53:16;
MODIFIED	= DATE 20-02-27  TIME 15:53:16;
FILE_NAME	= PNS0049;
VERSION		= 0;
LINE_COUNT	= 120;
MEMORY_SIZE	= 3867;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: R12 ;
   6:  !  PROGRAM: PNS0021 ;
   7:  !  PART:53103736/37 ;
   8:  !HL_20150710********************* ;
   9:   ;
  10:  !INITIALIZE ;
  11:  MOVE TO HOME    ;
  12:  R[14:CG SENSETIVE]=90    ;
  13:  R[18:PICK TIME BEFORE]=1    ;
  14:  R[19:DROP TIME BEFORE]=.2    ;
  15:   ;
  16:  !------------------------------- ;
  17:  !BEGINNING OF PROGRAM ;
  18:  CALL PARTDROP    ;
  19:  COL GUARD ADJUST R[14] ;
  20:  UTOOL_NUM=1 ;
  21:  UFRAME_NUM=0 ;
  22:  PAYLOAD[3] ;
  23:  R[5:SPEED]=10    ;
  24:  OVERRIDE=R[5:SPEED] ;
  25:  !INITIATE TO PICK-POUNCE ;
  26:J P[16:CESHI] 30% CNT100 ACC30    ;
  27:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  28:J P[2:PICK POUNCE] 50% CNT100 ACC100    ;
  29:  R[1:CYCLE TOTAL]=0    ;
  30:  TIMER[1]=RESET ;
  31:  TIMER[1]=START ;
  32:   ;
  33:  LBL[10:TOP OF LOOF] ;
  34:  OVERRIDE=R[5:SPEED] ;
  35:   ;
  36:  TIMER[3]=STOP ;
  37:  TIMER[2]=STOP ;
  38:  R[1:CYCLE TOTAL]=R[1:CYCLE TOTAL]+1    ;
  39:  R[2:LAST CYCLE TIME]=TIMER[2]    ;
  40:  R[3:LAST SPM]=60/R[2:LAST CYCLE TIME]    ;
  41:  R[8:R MOVE TIME]=TIMER[3]    ;
  42:  TIMER[2]=RESET ;
  43:  TIMER[2]=START ;
  44:  TIMER[3]=RESET ;
  45:   ;
  46:  !PROCEED TO PICK ;
  47:  LBL[20] ;
  48:  IF DI[1:P1 PICK ENTRY OK]=ON AND DI[3:FROM RL1 CLEAR]=ON AND DI[8:P1 PICK START]=ON,JMP LBL[25] ;
  49:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
  50:  JMP LBL[20] ;
  51:   ;
  52:  LBL[25] ;
  53:  R[5:SPEED]=100    ;
  54:  OVERRIDE=R[5:SPEED] ;
  55:  TIMER[3]=START ;
  56:J P[3:PICK APPROACH] 100% CNT40 ACC110    ;
  57:   ;
  58:J P[4:PICK] 100% CNT0 TB R[18]sec,CALL PARTPICK ACC100 BREAK    ;
  59:  PAYLOAD[4] ;
  60:  CALL CHK_PICK    ;
  61:  MONITOR Z_CHECH ;
  62:   ;
  63:J P[5:PICK DEPART] 100% CNT60 ACC110 TA R[20]sec,DO[5:TO RL1 DROP START]=PULSE,1.0sec    ;
  64:  DO[8:P1 PARTS OUT]=PULSE,1.0sec ;
  65:   ;
  66:  LBL[27] ;
  67:  CALL CHECKPICK    ;
  68:  IF DI[9:VACUUM ON L]=OFF OR DI[11:VACUUM ON R]=OFF,JMP LBL[27] ;
  69:   ;
  70:J P[7:PICK CLEAR] 100% CNT100 ACC100    ;
  71:  LBL[30:GOTO DROP POUNCE] ;
  72:J P[8:DROP POUNCE] 100% CNT100 ACC110 BREAK    ;
  73:   ;
  74:  TIMER[3]=STOP ;
  75:  LBL[40:AT DROP POUNCE] ;
  76:  IF DI[2:P2 DROP ENTRY]=ON AND DI[4:FROM R23 CLEAR]=ON AND DI[5:P2 DROP START]=ON,JMP LBL[80] ;
  77:  IF DI[7:PRESS STAMPING COMPLETE]=ON AND DI[2:P2 DROP ENTRY]=ON,JMP LBL[50] ;
  78:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[60] ;
  79:  JMP LBL[40] ;
  80:   ;
  81:  LBL[50:MOVE DROP SNEAK] ;
  82:  TIMER[3]=START ;
  83:  OVERRIDE=R[5:SPEED] ;
  84:J P[9:DROP SNEAK] 100% CNT100 ACC100 BREAK    ;
  85:  LBL[51:DROP OR C-P-S] ;
  86:  IF DI[2:P2 DROP ENTRY]=ON AND DI[4:FROM R23 CLEAR]=ON AND DI[5:P2 DROP START]=ON,JMP LBL[80] ;
  87:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[40] ;
  88:  JMP LBL[51] ;
  89:  JMP LBL[50] ;
  90:   ;
  91:  LBL[60:MOVE CLS-PRS-ACC] ;
  92:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  93:  PAUSE ;
  94:  JMP LBL[30] ;
  95:   ;
  96:  LBL[80:DROP ENABLED] ;
  97:  TIMER[3]=START ;
  98:  !PROCEED TO DROP ;
  99:  OVERRIDE=R[5:SPEED] ;
 100:J P[10:DROP APPROACH] 100% CNT60 ACC100    ;
 101:  MONITOR END Z_CHECH ;
 102:J P[11:DROP] 100% CNT5 TB R[19]sec,CALL PARTDROP ACC100 BREAK    ;
 103:  DO[6:PART DROP COMPLETE]=PULSE,1.0sec ;
 104:  PAYLOAD[3] ;
 105:  CALL CHK_DROP    ;
 106:   ;
 107:J P[12:DROP DEPART] 100% CNT100 ACC130 TA    .10sec,DO[7:PRESS STAMPING START]=PULSE,1.0sec    ;
 108:J P[13:DROP CLEAR] 100% CNT100 ACC130    ;
 109:  !GOTO PICK POUNCE ;
 110:J P[2:PICK POUNCE] 100% CNT100 ACC100 BREAK    ;
 111:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
 112:  JMP LBL[10] ;
 113:   ;
 114:  LBL[90:END OF CYCLE] ;
 115:  TIMER[1]=STOP ;
 116:  R[4:TOTAL CYCLE TIME]=TIMER[1]    ;
 117:J P[1:MIDDLE] 50% CNT100    ;
 118:  MOVE TO HOME    ;
 119:   ;
 120:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2086.456  mm,	Y =     -.007  mm,	Z =  -810.000  mm,
	W =  -180.000 deg,	P =     -.000 deg,	R =  -180.000 deg,
	E1=   107.700 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2175.711  mm,	Y =  1469.504  mm,	Z = -1071.119  mm,
	W =   178.301 deg,	P =     1.292 deg,	R =   148.886 deg,
	E1=   137.768 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2614.156  mm,	Y =  3300.083  mm,	Z = -1102.917  mm,
	W =   179.501 deg,	P =     -.787 deg,	R =    94.892 deg,
	E1=   191.800 deg
};
P[4:"PICK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2614.077  mm,	Y =  3299.932  mm,	Z = -1171.831  mm,
	W =   179.505 deg,	P =     -.781 deg,	R =    94.895 deg,
	E1=   191.795 deg
};
P[5:"PICK DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2614.157  mm,	Y =  3300.082  mm,	Z = -1024.035  mm,
	W =   179.501 deg,	P =     -.788 deg,	R =    94.892 deg,
	E1=   191.800 deg
};
P[7:"PICK CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2188.610  mm,	Y =  1397.153  mm,	Z = -1007.450  mm,
	W =   178.791 deg,	P =      .843 deg,	R =   149.243 deg,
	E1=   136.127 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2101.189  mm,	Y =  -738.552  mm,	Z = -1045.439  mm,
	W =  -179.498 deg,	P =     1.891 deg,	R =  -165.928 deg,
	E1=    90.237 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2168.885  mm,	Y = -1567.271  mm,	Z = -1059.440  mm,
	W =  -178.548 deg,	P =     1.106 deg,	R =  -146.438 deg,
	E1=    71.332 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2641.143  mm,	Y = -3231.878  mm,	Z = -1141.540  mm,
	W =  -179.466 deg,	P =    -1.760 deg,	R =   -90.012 deg,
	E1=    16.677 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2641.150  mm,	Y = -3231.889  mm,	Z = -1320.212  mm,
	W =  -179.466 deg,	P =    -1.760 deg,	R =   -90.012 deg,
	E1=    16.677 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2641.163  mm,	Y = -3231.898  mm,	Z = -1300.193  mm,
	W =  -179.466 deg,	P =    -1.760 deg,	R =   -90.012 deg,
	E1=    16.677 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2101.566  mm,	Y =  -980.411  mm,	Z = -1138.537  mm,
	W =  -178.761 deg,	P =     1.386 deg,	R =  -157.649 deg,
	E1=    84.287 deg
};
P[16:"CESHI"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2057.615  mm,	Y =   417.240  mm,	Z =  -529.832  mm,
	W =   179.999 deg,	P =      .001 deg,	R =   161.277 deg,
	E1=   107.699 deg
};
/END
